import request from '@/utils/request'
export default {
    getHospList(page,limit,searchObj) {//医院列表
      return request ({
        url: `/admin/hosp/hospitalSet/list/${page}/${limit}`,
        method: 'get',
        params:searchObj
      })
    },

    //根据dictcode查询所有的子节点（所有的省）
    findByDictCode(dictCode){
        return request ({
            url: `/admin/cmn/dict/findByDictCode/${dictCode}`,
            method: 'get'
          })
    },

    //根据id查询子节点的数据，数据的二级联动（根据省查出所有的市）
    findChildId(id){
        return request ({
            url: `/admin/cmn/dict/findChildData/${id}`,
            method: 'get'
          })
    },

    //更新医院的上线状态
     updateStatus(id,status){
        return request ({
            url: `/admin/hosp/hospitalSet/updateHospStatus/${id}/${status}`,
            method: 'get'
          })
    },

    //查看医院的详情
    getHospById(id){
      return request ({
          url: `/admin/hosp/hospitalSet/showHospDetail/${id}`,
          method: 'get'
        })
  },

  //查看医院的科室
  getDeptByHoscode(hoscode){
    return request ({
        url: `/admin/hosp/department/getDeptList/${hoscode}`,
        method: 'get'
      })
},

  //查询预约规则
  getScheduleRule(page, limit, hoscode, depcode) {
    return request({
        url: `/admin/hosp/schedule/getScheduleRule/${page}/${limit}/${hoscode}/${depcode}`,
        method: 'get'
    })
  },

    //查询排班详情
  getScheduleDetail(hoscode,depcode,workDate) {
    return request ({
        url: `/admin/hosp/schedule/getScheduleDetail/${hoscode}/${depcode}/${workDate}`,
        method: 'get'
    })
}
    
}